package main

import "fmt"

// learn oop 专属于go的面向对象

type Student struct {
	Name string
}

type Stu Student // 重命名

func (s Student) PrintName() {
	fmt.Println(s.Name)
}

type Teacher struct {
	Name string
}

func main() {
	var s1 Student = Student{"小米"}
	s1.PrintName()
	//fmt.Println(s1)
	var t1 Teacher = Teacher{"小红"}
	fmt.Println(t1)
	s1 = Student(t1)
	//fmt.Println(s1)
	s1.PrintName()
}
